<style scoped>
    .el-dropdown .el-button--primary{padding: 5px 10px;vertical-align: top;}
</style>
<template>
    <div class="see-PO-page seeDisabled">
        <el-form :inline="true" :model="seePOForm" class="demo-form-inline" style="border-bottom:1px solid #ccc;">
            <el-form-item label="订单编号" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.prOrderCode" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="制单日期" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.createTime" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="制单人" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.creatorName" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="采购类别" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.procurementCategory.label" placeholder=""></el-input>
                <!-- 
                <el-select size="mini" disabled v-model="seePOForm.procurementCategory" placeholder="">
                    <el-option v-for="inquiryType in selectDropdown.type" :label="inquiryType.label" :value="inquiryType.value"></el-option>
                </el-select>
                -->
            </el-form-item>
            <el-form-item label="紧急程度" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.emergencyDegree.label" placeholder=""></el-input>
                <!-- <el-select size="mini" disabled v-model="seePOForm.emergencyDegree" placeholder="">  
                    <el-option v-for="inquiryType in selectDropdown.type" :label="inquiryType.label" :value="inquiryType.value"></el-option>
                </el-select>
                -->
            </el-form-item>
            <el-form-item label="采购合同号" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.contractNo" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="采购单位" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.poLegalPersonName" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="收货工厂" class="selectMB10" :label-width="formLabelWidth">
                <el-select size="mini" disabled  v-model="seePOForm.legalPlant" placeholder="请选择">
                    <el-option v-for="(legalPlant,index) in seePOForm.legalPlants" :key="index" :label="legalPlant" :value="legalPlant"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="期望到货日期" class="selectMB10" :label-width="labelWidth100">
                <el-date-picker type="date" size="mini" :editable="false" disabled v-model="seePOForm.expectTime" placeholder=""></el-date-picker>
            </el-form-item>
            <el-form-item label="供应商" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.partnerName" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="发货工厂" :label-width="formLabelWidth">
                <el-input size="mini" disabled v-model="seePOForm.sendPlant" placeholder=""></el-input>
                <!-- 
                <el-select size="mini"  v-model="seePOForm.sendPlant" placeholder="请选择">
                    <el-option v-for="sendPlant in seePOForm.sendPlant" :label="sendPlant.label" :value="sendPlant.value"></el-option>
                </el-select>
                -->
            </el-form-item>
            <el-form-item label="联系人" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.contacts" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="联系方式" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.telephone" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="币别" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.currency.label" placeholder=""></el-input>
                <!--
                <el-select size="mini" disabled v-model="seePOForm.currency" placeholder="">
                    <el-option v-for="inquiryCurrency in selectDropdown.currencyCode" :label="inquiryCurrency.label" :value="inquiryCurrency.value"></el-option>
                </el-select>
                -->
            </el-form-item>
            <el-form-item label="汇率" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.exRate" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="结算方式" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.settlementMethod.label" placeholder=""></el-input>
                <!--
                <el-select size="mini" disabled v-model="seePOForm.settlementMethod" placeholder="">
                    <el-option v-for="isIncludeTax in selectDropdown.isTax" :label="isIncludeTax.label" :value="isIncludeTax.value"></el-option>
                </el-select>
                -->
            </el-form-item>
            <el-form-item label="账期计算方法" class="selectMB10" :label-width="labelWidth100">
                <el-select size="mini" disabled v-model="seePOForm.calculationType.label" placeholder="">
                    <!-- 
                    <el-option v-for="isIncludeTax in selectDropdown.isTax" :label="isIncludeTax.label" :value="isIncludeTax.value"></el-option>
                    -->
                </el-select>
            </el-form-item>
            <el-form-item label="账期" class="selectMB10" :label-width="labelWidth">
                <el-input size="mini" disabled v-model="seePOForm.billPeriods" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="采购含税总金额" class="selectMB10" :label-width="labelWidth120">
                <el-input size="mini" disabled v-model="seePOForm.totalMoney" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="采购不含税总金额" :label-width="labelWidth120">
                <el-input size="mini" disabled v-model="seePOForm.totalMoneyNoTax" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="本币含税总金额" class="selectMB10" :label-width="labelWidth120">
                <el-input size="mini" disabled v-model="seePOForm.currencyTotalMoney" placeholder=""></el-input>
            </el-form-item>
            <el-form-item label="本币不含税总金额" :label-width="labelWidth120">
                <el-input size="mini" disabled v-model="seePOForm.currencyTotalMoneyNoTax" placeholder=""></el-input>
            </el-form-item>
            <el-form-item>
                <el-checkbox disabled v-model="singleDeliveryAddress">仅单一确定的收货地址</el-checkbox>
                <el-checkbox disabled v-model="inputPriceWithoutTax">填写不含税价格</el-checkbox>
            </el-form-item>
            <el-form-item label="备注">
                <el-input size="mini" disabled type="text"   autosize v-model="seePOForm.remarks" placeholder="请输入备注"></el-input>
            </el-form-item>
            <el-form-item>   <!-- v-if="seeFlag == true" 点击查看按钮进来，操作钮不显示 -->
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'SUBMITTED_IG_SUCCEED'" @click="handleReview">审核</el-button>
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'REVIEW_APPROVED_IG_SUCCEED'" @click="handleApprove">审批</el-button>
                <el-dropdown @command="handleCommand" v-if="seePOForm.status == 'EXAMINE_YES_IG_SUCCEED'">
                    <el-button type="primary">
                        打印<i class="el-icon-caret-bottom el-icon--right"></i>
                    </el-button>
                    <el-dropdown-menu slot="dropdown">
                        <el-dropdown-item command="zh">中文版打印</el-dropdown-item>
                        <el-dropdown-item command="en">英文版打印</el-dropdown-item>
                    </el-dropdown-menu>
                </el-dropdown>
               <!-- <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'EXAMINE_YES_IG_SUCCEED'&&languageType=='zh'" @click="handlePrint">打印</el-button>
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'EXAMINE_YES_IG_SUCCEED'&&languageType=='en'" @click="handlePrintEn">print</el-button>-->

                <!--  ?prOrderCode={{seePOForm.prOrderCode}}
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'EXAMINE_YES_IG_SUCCEED'">
                    <a href="./print.html">打印</a>
                </el-button>
                -->
                
                <el-button class="bolder outsideBtnBS" size="mini" type="danger" v-if="seePOForm.status == 'REVIEW_IG_FAIL' ||seePOForm.status == 'EXAMINE_IG_FAIL' || seePOForm.status == 'EXAMINE_REJECTED' ||seePOForm.status == 'REVIEW_REJECTED' || seePOForm.status == 'SAVED_IG_NO' || seePOForm.status == 'LOCAL_SAVED'" @click="handleRemove">作废</el-button>
            </el-form-item>
        </el-form>
        <!--采购明细表格-->
        <label class="default-label">采购明细：</label>
        <el-table :data="procurementDetailsData" border style="width: 100%;" v-loading.body="loading" element-loading-text="拼命加载中">
            <el-table-column type="index" header-align="center" align="center" label="序"  width="40"></el-table-column>
            <!--
    <el-table-column label="操作" header-align="center" align="center" width="80">
        <template scope="scope">
            <div class="operationItem bolder disabled" @click="handleDel(scope.$index, procurementDetailsData)" >删除</div>
        </template>
    </el-table-column>
    -->
            <el-table-column prop="materialCode" label="备件编码" header-align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="materialName"  label="备件名称" header-align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="standard"  label="规格" header-align="center" show-overflow-tooltip></el-table-column>
            <el-table-column prop="unit"  label="单位" header-align="center" width="80" show-overflow-tooltip></el-table-column>
            <el-table-column prop="amount"  label="数量" header-align="center" width="80">
                <template scope="scope">
                    <el-button size="mini" @click="quantityDetails(scope.$index, scope.row)"  class="blueFont">
                        {{scope.row.amount}}
                    </el-button>
                </template>
            </el-table-column>
            <el-table-column prop="priceWithTax"  label="含税单价" header-align="center" align="right">
                <template scope="scope">
                    <el-input size="mini" disabled v-model.number="scope.row.priceWithTax" placeholder="" ></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="priceNoTax" label="不含税单价" header-align="center" align="right">
                 <template scope="scope">
                    <el-input size="mini" disabled v-model.number="scope.row.priceNoTax" placeholder="" ></el-input>
                </template>
            </el-table-column>
            <el-table-column prop="taxCode" label="税码" header-align="center" width="80"></el-table-column>
            <el-table-column prop="taxRate" label="税率(%)" header-align="center"></el-table-column>
            <el-table-column prop="totalNoTax" label="不含税总金额" header-align="center" align="right"></el-table-column>
            <el-table-column prop="tax" label="税额" header-align="center" align="right"></el-table-column>
            <el-table-column prop="totalMoney" label="含税总金额" header-align="center" align="right"></el-table-column>
            <el-table-column prop="currency" label="币别" header-align="center" width="80" show-overflow-tooltip></el-table-column>
            <el-table-column prop="exRate" label="汇率" header-align="center" width="80"></el-table-column>
        </el-table>
        <!-- 点击数量查看PO明细信息 明细弹窗 -->
        <el-dialog title="明细" :visible.sync="quantityDetailsVisible" size="large" :lock-scroll="false">
            <el-table :data="quantityDetailsData" border style="width: 100%">
                <el-table-column type="index" header-align="center" align="center" label="序"  width="40"></el-table-column>
                <el-table-column property="planCode" label="计划编号" header-align="center" show-overflow-tooltip></el-table-column>
                <el-table-column property="materialCode" label="备件编码" header-align="center" show-overflow-tooltip></el-table-column>
                <el-table-column property="materialName" label="备件名称" header-align="center" show-overflow-tooltip></el-table-column>
                <el-table-column property="standard" label="规格" header-align="center" show-overflow-tooltip></el-table-column>
                <el-table-column property="unit" label="计量单位" header-align="center" show-overflow-tooltip></el-table-column>
                <el-table-column property="planAmount" label="计划数量" header-align="center"></el-table-column>
                <el-table-column property="leftAmount" label="未采购数量" header-align="center"></el-table-column>
                <el-table-column property="excuteAmount" label="本次采购数量" header-align="center">
                    <template scope="scope">
                        <el-input size="mini" class="excuteAmount" disabled v-model.number="scope.row.excuteAmount"  @change="quantityPurchased(scope.$index, scope.row,$event)"></el-input>
                    </template>
                </el-table-column>
            </el-table>
        </el-dialog>
        <!-- 点击审核 审核弹窗 -->
        <el-dialog title="审核提示信息" :visible.sync="handleReviewVisible" size="small" :lock-scroll="false">
            <el-form :model="reviewForm">
                <h2>是否审核通过当前单据？</h2>
                <el-form-item label="审核意见" :label-width="formLabelWidth">
                    <el-input type="textarea"  :rows="3" placeholder="请输入内容" v-model="reviewForm.textarea">
                    </el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="toExamine(true)">审核通过</el-button>
                <el-button @click="toExamine(false)">审核不通过</el-button>
            </div>
        </el-dialog>
        <!-- 点击审批 审批弹窗 -->
        <el-dialog id="approvalMask" title="审批提示信息" :visible.sync="handleApprovalVisible" size="small" :lock-scroll="false">
            <el-form :model="approvalForm">
                <h2>是否审批通过当前单据？</h2>
                <el-form-item label="审批意见" :label-width="formLabelWidth">
                    <el-input type="textarea"  :rows="3" placeholder="请输入内容" v-model="approvalForm.textarea">
                    </el-input>
                </el-form-item>
            </el-form>
            <div slot="footer" class="dialog-footer">
                <el-button type="primary" @click="examinationAndApproval(true)">审批通过</el-button>
                <el-button @click="examinationAndApproval(false)">审批不通过</el-button>
            </div>
        </el-dialog>
        <!-- 收货明细弹窗 -->
        <!--<el-dialog title="收货明细" :visible.sync="receivingInformationVisible" :lock-scroll="false">-->
            <div v-if="receivingInformationVisible">
                <label>收货明细：</label>
                <!-- 
                <el-button type="danger" class="bolder" size="mini"  @click="addStorageRoom()" >新增</el-button>
                -->
                <el-table :data="receivingInformationDate" border style="margin-top:16px;width: 100%;">
                    <el-table-column type="index" header-align="center" align="center" label="序"  width="40"></el-table-column>
                    <!-- 
                    <el-table-column label="操作" header-align="center" align="center" width="80">
                        <template scope="scope">
                            <div class="operationItem bolder" @click="deleteReceivingInformation(scope.$index, receivingInformationDate)" >删除</div>
                        </template>
                    </el-table-column>
                    -->
                    <el-table-column prop="storeRoomName" label="仓库名称" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column prop="storeRoomAdress" label="地址" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column prop="linkMan" label="联系人" header-align="center" show-overflow-tooltip></el-table-column>
                    <el-table-column prop="linkManMobile" label="联系电话" header-align="center" show-overflow-tooltip></el-table-column>
                </el-table>
            </div>

        <!--</el-dialog>-->
    </div>
</template>


<script>

    export default {
        data() {
            return {
                labelWidth:"80px",
                labelWidth100:"100px",
                labelWidth120:"120px",
                // seeFlag:false,  //点击查看按钮进来，为true   操作钮不显示
                // 查询表单
                seePOForm:{
                    id: "",
                    prOrderCode: "",
                    createTime: "",
                    updateTime: "",
                    contractNo: "",
                    expectTime: "",
                    sendPlant: "",
                    contacts: "",
                    telephone: "",
                    exRate: "",
                    billPeriods: "",
                    amount: "",
                    totalMoney: "",
                    currencyTotalMoney: "",
                    storeRoomCode: "",
                    status: "",
                    procurementCategory: "",
                    emergencyDegree: "",
                    legalPlant: "",
                    currency: "",
                    settlementMethod: "",
                    calculationType: "",
                    creatorName: "",
                    creatorId: "",
                    partnerId: "",
                    partnerCode: "",
                    partnerName: "",
                    poLegalPersonName: "",
                    poLegalPersonCode: "",
                    taxCodeSelector:""    //税码下拉列表
                },
                singleDeliveryAddress:false,    // 仅单一确定的收货地址(true)
                inputPriceWithoutTax:true,    //填写不含税单价(true 默认填写)   
                loading:false,
                procurementDetailsData: [],// 采购明细明细表格
                // selectDropdown:[],  // 下拉列表的值
                receivingInformationVisible:false,   //收货信息的弹窗不可见
                receivingInformationDate:[],    //收货信息 表格 
                formLabelWidth:"90",
                handleReviewVisible:false,    //审核弹窗
                reviewForm:{      //审核内容
                    textarea:""
                },
                handleApprovalVisible:false,    // 审批弹窗
                approvalForm:{      //审批内容
                    textarea:""
                },

                quantityDetailsVisible:false,    //点击每行的数量 明细弹窗
                quantityDetailsData:[]    //点击每行的数量 明细弹窗中的数据

            };
        },
        computed:{
            languageType(){
                return this.$store.state.languageType;
            }
        },
        //进入页面立即运行此方法
        mounted: function () {
            var _this = this;
            _this.$store.commit('currentActive', 'SeePO');

            _this.seePOForm.prOrderCode=_this.$route.query.prOrderCode;
            // _this.seeFlag=_this.$route.query.seeFlag;   // 查看订单
            _this.seePODetails();  //进入页面直接 查看PO详情


        },
        methods: {
           seePODetails(){   //查看PO详情
                var _this =this;
                // var tmp = {prOrderCode:_this.seePOForm.prOrderCode};
                $.ajax({
                    url:_this.procurement_service+'procurementOrder/view?prOrderCode='+_this.seePOForm.prOrderCode,
                    type:'POST',
                    cache:false,
                    // data:JSON.stringify(tmp),
                    dataType:'JSON',
                    contentType:'application/json;charset=utf-8',
                    success:function(data){
                        // console.log(data);
                        if(data.success){
                            //'仅单一确定的收货地址'
                            _this.singleDeliveryAddress=data.data.procurementOrderBasic.hasSingleAddr;
                            _this.receivingInformationVisible=data.data.procurementOrderBasic.hasSingleAddr;
                            // 库房信息
                            if(data.data.storeRoom){
                                _this.receivingInformationDate.push(data.data.storeRoom);
                            }
                            //'填写不含税单价'为NO时，应为选中状态
                            if(data.data.procurementOrderBasic.withTaxFlag == 'NO'){
                                _this.inputPriceWithoutTax = true;
                            }else if(data.data.procurementOrderBasic.withTaxFlag == 'YES'){
                                _this.inputPriceWithoutTax = false;
                            }

                            _this.seePOForm=data.data.procurementOrderBasic;

                            if(_this.seePOForm.totalMoney!=null){
                                _this.seePOForm.totalMoney = _this.seePOForm.totalMoney.toFixed(2);   //采购含税总金额保留两位小数totalMoneyNoTax
                            }
                            if(_this.seePOForm.totalMoneyNoTax!=null){
                                _this.seePOForm.totalMoneyNoTax = _this.seePOForm.totalMoneyNoTax.toFixed(2);   //采购不含税总金额保留两位小数
                            }
                            if(_this.seePOForm.currencyTotalMoney!=null){
                                _this.seePOForm.currencyTotalMoney = _this.seePOForm.currencyTotalMoney.toFixed(2);   //本币含税总金额保留两位小数
                            }
                            if(_this.seePOForm.currencyTotalMoneyNoTax!=null){
                                _this.seePOForm.currencyTotalMoneyNoTax = _this.seePOForm.currencyTotalMoneyNoTax.toFixed(2);   //本币不含税总金额保留两位小数
                            }
                            _this.seePOForm.poLegalPersonCode = data.data.procurementOrderBasic.legalPersonCode;    
                            _this.seePOForm.poLegalPersonName = data.data.procurementOrderBasic.legalPersonName;
                            var arr=data.data.procurementOrderItems;
                            //单价保留八位小数，总金额保留两位
                            for(var i=0;i<arr.length;i++){
                                if(arr[i].priceWithTax!=null){
                                    arr[i].priceWithTax=arr[i].priceWithTax.toFixed(8);
                                }
                                if(arr[i].priceNoTax!=null){
                                    arr[i].priceNoTax=arr[i].priceNoTax.toFixed(8);
                                }
                                if(arr[i].totalNoTax!=null){
                                    arr[i].totalNoTax=arr[i].totalNoTax.toFixed(2);
                                }
                                if(arr[i].tax!=null){
                                    arr[i].tax=arr[i].tax.toFixed(2);
                                }
                                if(arr[i].totalMoney!=null){
                                    arr[i].totalMoney=arr[i].totalMoney.toFixed(2);
                                }                                
                            }
                            _this.procurementDetailsData=arr;
                        }else{
                            _this.common.errorTip(data.errorMessage);
                        }
                    }
                })
           },
            // 点击每行的数量 明细弹窗
            quantityDetails(index, row){
                var _this = this;
                _this.quantityDetailsVisible = true;
                _this.quantityDetailsData = row.poItemExcuteVos;
                // $.ajax({
                //     url:_this.procurement_service+'procurementOrder/createPoItemExecutesByPlanAggregationItemId?planAggregationItemId='+row.planAggregationItemId,
                //     type:'POST',
                //     cache:false,
                //     // data:JSON.stringify(tmp),
                //     dataType:'JSON',
                //     contentType:'application/json;charset=utf-8',
                //     success:function(data){
                //         if(data.success){
                //             // console.log(data.data);
                //             _this.quantityDetailsData=data.data;
                //         }else{
                //             _this.common.errorTip(data.errorMessage);
                //         }
                //     }
                // })
            },
            //审核按钮
            handleReview(){
                var _this=this;
                _this.handleReviewVisible=true;
            },
            toExamine(auditorStatus){   //true 审核通过  false审核不通过
                var _this = this;
                var tmp={orderCode:_this.seePOForm.prOrderCode,approve:auditorStatus,reviewOpinions:_this.reviewForm.textarea};
                $.ajax({
                    url:_this.procurement_service+'procurementOrder/review',
                    type:'POST',
                    cache:false,
                    data:JSON.stringify(tmp),
                    dataType:'JSON',
                    contentType:'application/json;charset=utf-8',
                    success:function(data){
                        if(data.success){
                            _this.common.successTip("操作成功！");
                            _this.$router.push("/SpareOrder");
                        }else{
                            _this.common.errorTip(data.errorMessage);
                        }
                    }
                })
            },
            // 审批按钮
            handleApprove(){
                var _this=this;
                _this.handleApprovalVisible=true;
            },
            examinationAndApproval(approverStatus){ //1 审批通过  0审批不通过
                var _this = this;
                var tmp={orderCode:_this.seePOForm.prOrderCode,approve:approverStatus,examineOpinions:_this.approvalForm.textarea};
                $.ajax({
                    url:_this.procurement_service+'procurementOrder/examineApprove',
                    type:'POST',
                    cache:false,
                    data:JSON.stringify(tmp),
                    dataType:'JSON',
                    contentType:'application/json;charset=utf-8',
                    success:function(data){
                        if(data.success){
                            _this.common.successTip("操作成功！");
                            _this.$router.push("/SpareOrder");
                        }else{
                            _this.common.errorTip(data.errorMessage);
                        }
                    }
                })
            },
            handleCommand(command) {
               /* this.$message('click on item ' + command);*/
               if(command=='zh'){
                   var _this = this;
                   _this.$router.push({path:"/PrintPO",query:{prOrderCode:_this.seePOForm.prOrderCode}});
               }else{
                   var _this = this;
                   _this.$router.push({path:"/PrintPOEn",query:{prOrderCode:_this.seePOForm.prOrderCode}});
               }
            },
            // 打印按钮
            handlePrint(){

                // window.location.href="print.html?prOrderCode="+_this.seePOForm.prOrderCode; 
            },
            //打印按钮 英文版
            handlePrintEn(){

                // window.location.href="print.html?prOrderCode="+_this.seePOForm.prOrderCode;
            },
            // 作废
            handleRemove(){
                var _this=this;
                 $.ajax({
                    url:_this.procurement_service+'procurementOrder/remove?orderCode='+_this.seePOForm.prOrderCode,
                    //+'&approve='
                    type:'POST',
                    cache:false,
                    // data:JSON.stringify(tmp),
                    dataType:'JSON',
                    contentType:'application/json;charset=utf-8',
                    success:function(data){
                        if(data.success){
                            _this.common.successTip("操作成功！");
                            _this.$router.push("/SpareOrder");
                        }else{
                            _this.common.errorTip(data.errorMessage);
                        }
                    }
                })
            },
            // // ===================================
            // successTip(p) {     //成功时的提示信息
            //     this.$notify({
            //         title: '成功',
            //         message: p,
            //         type: 'success'
            //     });
            // },
            // errorTip(p) {     //错误提示
            //     this.$notify.error({
            //         title: '错误',
            //         message: p
            //     });
            // }

        }
    }
</script>
